package com.fanhao.dllo.soundfm.entity.greendao;

import android.database.sqlite.SQLiteDatabase;

import java.util.Map;

import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.AbstractDaoSession;
import de.greenrobot.dao.identityscope.IdentityScopeType;
import de.greenrobot.dao.internal.DaoConfig;

import com.fanhao.dllo.soundfm.entity.greendao.FocusImages;
import com.fanhao.dllo.soundfm.entity.greendao.EditorEntity;
import com.fanhao.dllo.soundfm.entity.greendao.SpecialEntity;
import com.fanhao.dllo.soundfm.entity.greendao.DiscoveryEntity;
import com.fanhao.dllo.soundfm.entity.greendao.HotEntity;

import com.fanhao.dllo.soundfm.entity.greendao.FocusImagesDao;
import com.fanhao.dllo.soundfm.entity.greendao.EditorEntityDao;
import com.fanhao.dllo.soundfm.entity.greendao.SpecialEntityDao;
import com.fanhao.dllo.soundfm.entity.greendao.DiscoveryEntityDao;
import com.fanhao.dllo.soundfm.entity.greendao.HotEntityDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see de.greenrobot.dao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig focusImagesDaoConfig;
    private final DaoConfig editorEntityDaoConfig;
    private final DaoConfig specialEntityDaoConfig;
    private final DaoConfig discoveryEntityDaoConfig;
    private final DaoConfig hotEntityDaoConfig;

    private final FocusImagesDao focusImagesDao;
    private final EditorEntityDao editorEntityDao;
    private final SpecialEntityDao specialEntityDao;
    private final DiscoveryEntityDao discoveryEntityDao;
    private final HotEntityDao hotEntityDao;

    public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        focusImagesDaoConfig = daoConfigMap.get(FocusImagesDao.class).clone();
        focusImagesDaoConfig.initIdentityScope(type);

        editorEntityDaoConfig = daoConfigMap.get(EditorEntityDao.class).clone();
        editorEntityDaoConfig.initIdentityScope(type);

        specialEntityDaoConfig = daoConfigMap.get(SpecialEntityDao.class).clone();
        specialEntityDaoConfig.initIdentityScope(type);

        discoveryEntityDaoConfig = daoConfigMap.get(DiscoveryEntityDao.class).clone();
        discoveryEntityDaoConfig.initIdentityScope(type);

        hotEntityDaoConfig = daoConfigMap.get(HotEntityDao.class).clone();
        hotEntityDaoConfig.initIdentityScope(type);

        focusImagesDao = new FocusImagesDao(focusImagesDaoConfig, this);
        editorEntityDao = new EditorEntityDao(editorEntityDaoConfig, this);
        specialEntityDao = new SpecialEntityDao(specialEntityDaoConfig, this);
        discoveryEntityDao = new DiscoveryEntityDao(discoveryEntityDaoConfig, this);
        hotEntityDao = new HotEntityDao(hotEntityDaoConfig, this);

        registerDao(FocusImages.class, focusImagesDao);
        registerDao(EditorEntity.class, editorEntityDao);
        registerDao(SpecialEntity.class, specialEntityDao);
        registerDao(DiscoveryEntity.class, discoveryEntityDao);
        registerDao(HotEntity.class, hotEntityDao);
    }
    
    public void clear() {
        focusImagesDaoConfig.getIdentityScope().clear();
        editorEntityDaoConfig.getIdentityScope().clear();
        specialEntityDaoConfig.getIdentityScope().clear();
        discoveryEntityDaoConfig.getIdentityScope().clear();
        hotEntityDaoConfig.getIdentityScope().clear();
    }

    public FocusImagesDao getFocusImagesDao() {
        return focusImagesDao;
    }

    public EditorEntityDao getEditorEntityDao() {
        return editorEntityDao;
    }

    public SpecialEntityDao getSpecialEntityDao() {
        return specialEntityDao;
    }

    public DiscoveryEntityDao getDiscoveryEntityDao() {
        return discoveryEntityDao;
    }

    public HotEntityDao getHotEntityDao() {
        return hotEntityDao;
    }

}
